﻿using Eamon.MeituanDotnetSDK.@enum;
using System;
namespace Eamon.MeituanDotnetSDK.exception
{
    public class MtSdkException : Exception
    {
        public string ErrCode { get; }

        public MtSdkException(string msg) : base(msg)
        {
        }

        public MtSdkException(string msg, Exception e) : base(msg, e)
        {
        }

        public MtSdkException(SdkErrorEnum sdkError, Exception e) : base(sdkError.GetMsg(), e)
        {
            ErrCode = sdkError.GetCode();
        }

        public MtSdkException(string errCode, string errMsg) : base(errMsg)
        {
            ErrCode = errCode;
        }

        public MtSdkException(SdkErrorEnum sdkError) : base(sdkError.GetMsg())
        {
            ErrCode = sdkError.GetCode();
        }
    }
}
